<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity5">
<head>


    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>秒杀</title>
    <link rel="stylesheet" th:href="@{/css/bootstrap.min.css}">
    <script th:src="@{/js/jquery-2.1.4.min.js}"></script>
    <script th:src="@{/js/bootstrap.min.js}"></script>
    <script th:src="@{/js/web/seckill.js}"></script>

</head>

<body>

<div style="margin: 15px; float: left;" th:each="product:${list}">
    <p>产品ID:<span th:text="${product.id}"></span></p>
    <p>产品名称: <span th:text="${product.name}"></span></p>
    <p>产品价格:<span th:text="${product.price}"></span></p>
    <p>秒杀价格:<span th:text="${product.seckill_price}"></span></p>
    <p>开始时间:<span th:text="${#dates.format(product.seckill_start_date, 'yyyy-MM-dd HH:mm:ss')}"></span></p>
    <p>结束时间:<span th:text="${#dates.format(product.seckill_end_date, 'yyyy-MM-dd HH:mm:ss')}"></span></p>
    <button class="seckill" type="button" th:id="${product.id}">秒杀</button>
    <p class="time" th:data="${product.seckill_start_time}">
        <span>00</span>天
        <span>00</span>时
        <span>00</span>分
        <span>00</span>秒
    </p>
</div>
<h1 th:if="${list.size()==0}">没有秒杀商品</h1>
</body>
</html>
